import request from '@/utils/request'

// 查询TOrder详细
export function getTOrder (OID) {
    return request({
        url: '/api/v1/torder/' + OID,
        method: 'get'
    })
}


// 新增TOrder
export function addTOrder(data) {
    return request({
        url: '/api/v1/torder',
        method: 'post',
        data: data
    })
}

// 修改TOrder
export function updateTOrder(data) {
    return request({
        url: '/api/v1/torder/'+data.OID,
        method: 'put',
        data: data
    })
}

// 删除TOrder
export function delTOrder(data) {
    return request({
        url: '/api/v1/torder',
        method: 'delete',
        data: data
    })
}

export function addRechargeOrder(data) {
  return request({
    url: '/api/v1/recharge',
    method: 'post',
    data: data
  })
}

export function getRightsConfig(data) {
  return request({
    url: '/api/v1/rights/config',
    method: 'get',
  })
}

export function listTOrder(query) {
  return request({
    url: '/api/v1/orderList',
    method: 'get',
    params: query
  })
}
